<script>
    $(document).ready(function () {
        $('#btn_quit').click(function () {
            $.ajax({
                url: '{{ url_for("login.login_quit") }}',
                type: 'post',
                success: function (data) {
                    alert(data)
                    window.open('{{ url_for("login.login") }}', '_self')
                },
                error: function () {
                    alert('程序出现错误')
                }
            })
        })
    })
</script>
<style>
    * {
        padding: 0;
        margin: 0;
    }

    ul li {
        list-style-type: none;
    }

    .page-header1 a {
        text-decoration: none;
    }

    .page-header1 a:hover, .page-header1 a:visited, .page-header1 a:link, .page-header1 a:active {
        color: black;
    }

    .page-header1 {
        height: 50px;
        background-color: rgb(255, 255, 255);
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
        border-bottom: 1px solid rgb(204, 204, 204);
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .page-header1 .right{
        float: right;
        height: 50px;
        width: 100px;
        /*margin: 0 10px;*/
        text-align: center;
        line-height: 50px;
        font-size: small;
    }

    .page-header1 .right:hover {
        background-color: rgb(192, 192, 192);
    }

    .page-header1 .left {
        float: left;
        height: 50px;
        width: 100px;
        /*margin: 0 10px;*/
        text-align: center;
        line-height: 50px;
        font-size: small;
    }

    .page-header1 .left button {
        height: 100%;
        width: 100%;
    }


</style>
<div class="page-header1">
    <div>
        <div class="right"><a href="{{ url_for('make.make_index') }}">零件管理</a></div>
        <div class="right"><a href="{{ url_for('select.select_index') }}">零件增减</a></div>
        <div class="right"><a href="{{ url_for('export.export1') }}">导出记录</a></div>
        <div class="right"><a href="{{ url_for('analyse.analyse1') }}">数据分析</a></div>
    </div>
    <div class="left" style="width: 200px">您好: {{ session.get('username') }}</div>
    <div class="left">
        <button id="btn_quit">退出登录</button>
    </div>
</div>